package com.teame.readbaby.dao;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.database.sqlite.SQLiteDatabase.CursorFactory;

public class DBHelper extends SQLiteOpenHelper {
	private static String NAME="ithm.db";
	private static int VERSION=1;
	public DBHelper(Context context) {
		super(context, NAME, null, VERSION);
	}
	
	public static final String TABLE_ID="_id";//通用的主键
//	public static final String TABLE_NEWS_NAME="news";//新闻表名
//	
//	public static final String TABLE_NEWS_TITLE = "title";// 新闻标题
//	public static final String TABLE_NEWS_SUMMARY = "summary";// 新闻摘要
	
	public static final String TABLE_HELP="help";//帮助
	
	public static final String TABLE_HELP_TITLE = "title";// 标题
	public static final String TABLE_HELP_VERSION = "version";// 版本

	@Override
	public void onCreate(SQLiteDatabase db) {
//		db.execSQL("CREATE TABLE " + TABLE_HELP + " (" + //
//				TABLE_ID + " integer primary key autoincrement, " + //
//				TABLE_HELP_TITLE + " varchar(50), " + //
//				TABLE_HELP_VERSION + " VARCHAR(5))"//
//		);
		db.execSQL("CREATE TABLE " + TABLE_HELP + " (" + //
				TABLE_ID + " varchar(50), " + //
				TABLE_HELP_TITLE + " varchar(50), " + //
				TABLE_HELP_VERSION + " VARCHAR(5))"//
		);

	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
		// TODO Auto-generated method stub

	}

}
